// ex6_2.cpp
#include <iostream>
const unsigned int Size = 10;

int main(void)
{
    using namespace std;
    double scores[Size];
    double num, sum1 = 0.0, average;
    int count = 0, cnt = 0;

    cout << "Enter 10 double numbers:\n";
    cin >> num;
    
    // if (cin.good())
    //     isalpha = false;
    // else
    //    isalpha = true;    
    while (cin.good())
    { 
        scores[count] = num;
        sum1 += scores[count];
        if (count < Size)
        {   count++;
            cin >> num;
        }
        else
            break;
    }
    
    if (count > 0)
        average = sum1 / count;
    else
       average = 0.0;    
	if (count > 0)
	{
		for (int i = 0; i < count; i++)
		{
			if (scores[i] > average)
				cnt ++;
		}
	}
    cout << "count = " << count << " average = " << average << endl;
	cout << cnt << " larger than average value." << endl;
}

